<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>计算三角形面积</title>
</head>

<body>
<script language="javascript">
	function rec(form) {
		form.t3.value=form.t1.value*form.t2.value/2
		}
    
    </script>
<form action="">
底：<input type="text" name="t1" value=""  /><br/>
高：<input type="text" name="t2" value="" /><br/>
<input type="button" name="button" value="面积" onclick="rec(this.form)"  />
<input type="text" name="t3" value="" />
</form>
</body>
</html>
